package com.tc.objectstream;

import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.ObjectInputStream;

/**
 * @Auther: tianchao
 * @Date: 2021/11/25 16:15
 * @Description:
 */
public class TestRead {
    public static void main(String[] args) throws IOException, ClassNotFoundException {
        String path = System.getProperty("user.dir");
        InputStream inputStream = new ObjectInputStream(new FileInputStream(path+"/objectstream/testObj"));
        FileInputStream fileInputStream = new FileInputStream(path + "/objectstream/testObj");
        ObjectInputStream ois = new ObjectInputStream(fileInputStream);
        Object o = ois.readObject();
        ois.close();
        System.out.println(o);
    }
}
